/**
 * 
 */
package org.braketester.entry;

/**
 * @author LAP
 *
 */
public abstract class AbstractApplyer<T> {
	protected T oldPreferences;
	protected T changedPreferences;
	
	public void setPreferences(T preferences) {
		if (preferences == null) throw new IllegalArgumentException("Preferences must be not null");
		changedPreferences = preferences;	
	}
	
	public abstract void apply();
	public abstract void cancel();
	
	public AbstractApplyer(T preferences) {
		if (preferences == null) throw new IllegalArgumentException("perfereces must be not null");
		oldPreferences = preferences;
	}
}
